<%@page import="org.apache.commons.lang3.StringUtils"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="user-index-head.jsp"%> 
<%
	String str = (String)request.getAttribute("ret");
	if(!StringUtils.isEmpty(str)){
		out.print("<script>alert('"+str+"');</script>");
	}
%>
<script src="<%=path %>/js/date/WdatePicker.js"></script>
<form class="form" method="post" action="<%=path%>/user/lottery!addTo.do"  target="_top" enctype="multipart/form-data" >
 <input type="hidden" value="LOTTERY_COUPON" name="lottery">
	<input type="hidden" value="LOTTERY_COUPON" name="keyword.model">
	<input type="hidden" value="LOTTERY_COUPON" name="keyword.lottery.type"/>
	<input type="hidden" name="keyword.id" value="${keyword.id}">
  <input type="hidden" name="keyword.lottery.id" value="${keyword.lottery.id}">
<div class="content">
<!--活动开始-->
<div class="cLineB">
  <h4>编辑优惠券活动开始内容</h4><a href="<%=path%>/user/lottery!index.do?lottery=LOTTERY_COUPON" class="right btnGrayS vm" style="margin-top:-27px">返回</a></div>  
<div class="msgWrap bgfc">
 
<table class="userinfoArea" style=" margin:0;" border="0" cellspacing="0" cellpadding="0" width="100%"><tbody>
<tr>
  <th valign="top"><span class="red">*</span>关键词：</th>
  <td><input type="input" class="px" id="keyword" value="${keyword.keyword }" name="keyword.keyword" style="width:400px"><br>
  	<span class="red">只能写一个关键词</span>，用户输入此关键词将会触发此活动。</td>
  <td rowspan="7" valign="top"><div style="margin-left:20px">
  <img id="pic" src="http://7.dijiuweishenghuo.duapp.com/youhuiquan.jpg" width="373px">
<br>
<input class="px" name="keyword.lottery.startPic" value="${keyword.lottery.startPic }" onclick="document.getElementById('pic').src=this.value;" style="width:363px;">
<br>
  	填写活动开始图片网址
  </div><div style="margin-left:20px">
  <img id="zjpic" src="http://7.dijiuweishenghuo.duapp.com/gongxi.jpg" width="373px">
<br>
<input class="px" name="keyword.lottery.zjpic" value="${keyword.lottery.zjpic }" onclick="document.getElementById('zjpic').src=this.value;" style="width:363px;">
<br>
  	填写中奖后显示的头部图片地址
     <br>

  </div></td>
</tr>
<tr>
  <th valign="top"><span class="red">*</span>活动名称：</th>
  <td><input type="input" class="px" id="title" value="${keyword.lottery.title }" name="keyword.lottery.title" style="width:400px">
  	<br>
  	请不要多于50字!
  	</td>
  </tr>

<tr>
  	<th valign="top"><span class="red">*</span>优惠券介绍：</th>
  	<td><textarea class="px" id="sttxt" name="keyword.lottery.sttxt" style="width:400px; height: 125px;">${keyword.lottery.sttxt }</textarea>
  		 </td>
</tr>
  	<tr>
  	<th><span class="red">*</span>活动时间：</th>
  	<td><input type="input" class="px" id="statdate" value="${keyword.lottery.startDate }" onclick="WdatePicker()" name="keyword.lottery.startDate"> 
                           
  		到
  		<input type="input" class="px" id="enddate" value="${keyword.lottery.endDate }" name="keyword.lottery.endDate" onclick="WdatePicker()" > </td>
  </tr>
<tr>
<th valign="top"><span class="red">*</span>优惠券活动说明：</th>
<td><textarea class="px" id="info" name="keyword.lottery.info" style="width: 400px; height: 125px;">${keyword.lottery.info }</textarea>
活动说明. </td>
</tr>
<tr>
<th><span class="red">*</span>兑换券使用说明：</th>
<td><textarea id="aginfo" class="px" name="keyword.lottery.aginfo" style="width: 400px; height: 125px;">${keyword.lottery.aginfo }</textarea>用户获取优惠券后显示的提示信息
</td>
</tr>
</tbody>
</table>
 </div> 
  
<!--活动结束-->
<div class="cLineB"><h4>活动结束内容</h4></div> 
<div class="msgWrap bgfc">
 
  	<table class="userinfoArea" style=" margin: 0;" border="0" cellspacing="0" cellpadding="0" width="100%">
  		<tbody>
  			<tr>
  				<th valign="top"><span class="red">*</span>活动结束公告主题：</th>
  				<td><input type="input" class="px" id="endtite" value="${keyword.lottery.endTitle }" name="keyword.lottery.endTitle" style="width:400px">
  					<br>
  					请不要多于50字! </td>
  				<td rowspan="4" valign="top"><div style="margin-left:20px">
  				<img id="end" src="http://7.dijiuweishenghuo.duapp.com/youhuiquan-end.jpg" width="373px"> <br>
  					<input class="px" name="keyword.lottery.endPicUrl" onchange="document.getElementById('end').src=this.value;" value="${keyword.lottery.endPicUrl }" style="width:363px;">
  					<br>
  					填写活动结束图片网址 </div></td>
  				</tr>
  			<tr>
  				<th valign="top">活动结束说明：</th>
  				<td valign="top"><textarea class="px" id="endinfo" name="keyword.lottery.endInfo" style="width: 400px; height: 125px;">${keyword.lottery.endInfo }</textarea>活动结束显示
  				 </td>
  				</tr>
  			</tbody>
  		</table>
  </div> 
  
  
<!--奖项设置-->
<div class="cLineB">
          	<h4>优惠券设置</h4></div> 
<div class="msgWrap bgfc">

<table class="userinfoArea" style=" margin: 0;" border="0" cellspacing="0" cellpadding="0" width="100%"><tbody>
<tr>
<th valign="top"><span class="red">*</span>优惠券名称1：</th>
<td><input type="input" class="px" id="fist" name="keyword.lottery.fist" value="${keyword.lottery.fist }" style="width:250px">
请不要多于50字! </td>
  <td rowspan="9" valign="top">&nbsp;</td>
</tr>
<tr>
<th valign="top"><span class="red">*</span>优惠券数量：</th>
<td><input type="input" class="px" id="fistnums" name="keyword.lottery.fistNums" value="${keyword.lottery.fistNums }" style="width:60px">
</td>
                                    </tr>
<tr>
<th valign="top">优惠券名称2：</th>
<td><input type="input" class="px" id="second" name="keyword.lottery.second" value="${keyword.lottery.second }" style="width:250px">
请不要多于50字! </td>
                                        </tr>
<tr>
<th valign="top">优惠券数量：</th>
<td><input type="input" class="px" id="secondnums" name="keyword.lottery.secondNums" value="${keyword.lottery.secondNums }" style="width:60px">
</td>
                                        </tr>
<tr>
<th valign="top">优惠券名称3：</th>
<td><input type="input" class="px" id="third" name="keyword.lottery.third" value="${keyword.lottery.third }" style="width:250px">
请不要多于50字! </td>
                                        </tr>
<tr>
<th valign="top">优惠券数量：</th>
<td><input type="input" class="px" id="thirdnums" name="keyword.lottery.thirdNums" value="${keyword.lottery.thirdNums }" style="width:60px">
 </td>

  </tbody>

<tbody>
<tr>
<th valign="top"><span class="red">*</span>预计活动的人数：</th>
<td><input type="input" class="px" id="allpeople" name="keyword.lottery.allpeople"   value="${keyword.lottery.allpeople }" style="width:150px"/>  预估活动人数直接影响抽奖概率：中奖概率 = 奖品总数/(预估活动人数*每人抽奖次数) 如果要确保任何时候都100%中奖建议设置为1人参加!<span class='red'>如果要确保任何时候都100%中奖建议设置为1人参加!并且奖项只设置一等奖.</span></td>
  </tr>
<tr>
<th valign="top"><span class="red">*</span>每人最多允许抽奖次数：</th>
<td><input type="input" class="px" id="canrqnums" name="keyword.lottery.canrqnums"   value="${keyword.lottery.canrqnums }" style="width:150px"/>
必须1-5之间的数字</td>
 </tr>
                                        
<tr>
<th valign="top">SN码生成设置：</th>
<td>
    <input class="radio" type="radio" checked name="keyword.lottery.snimport" value="0">自动生成  
    <input class="radio" type="radio" name="keyword.lottery.snimport" value="1">手动生成(SN码管理)
</td> 
</tr>
<tr>
<th>&nbsp;</th>
<td><button type="submit" name="button" class="btnGreen">保存</button>　<a href="" class="btnGray vm">取消</a>　<span class="red">请确认功能管理已开启优惠券功能</span></td>
                                    </tr>
</tbody>
</table>
</div> 
</div>
</form>
<include file="Public:footer"/> 